<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic
  PUBLIC "-//OASIS//DTD DITA Composite//EN" "ditabase.dtd">
<topic id="topic1" xml:lang="en">
  <title id="hc143896">pg_partition_rule</title>
  <body>
    <p>The <codeph>pg_partition_rule</codeph> system catalog table is used to track partitioned
      tables, their check constraints, and data containment rules. Each row of
        <codeph>pg_partition_rule</codeph> represents either a leaf partition (the bottom level
      partitions that contain data), or a branch partition (a top or mid-level partition that is
      used to define the partition hierarchy, but does not contain any data).</p>
    <table id="hc179425">
      <title>pg_catalog.pg_partition_rule</title>
      <tgroup cols="4">
        <colspec colnum="1" colname="col1" colwidth="131pt"/>
        <colspec colnum="2" colname="col2" colwidth="74.25pt"/>
        <colspec colnum="3" colname="col3" colwidth="123pt"/>
        <colspec colnum="4" colname="col4" colwidth="147pt"/>
        <thead>
          <row>
            <entry colname="col1">column</entry>
            <entry colname="col2">type</entry>
            <entry colname="col3">references</entry>
            <entry colname="col4">description</entry>
          </row>
        </thead>
        <tbody>
          <row>
            <entry colname="col1">
              <codeph>paroid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_partition.oid</entry>
            <entry colname="col4">Row identifier of the partitioning level (from <xref
                href="pg_partition.xml#topic1" type="topic" format="dita"/>) to which this partition
              belongs. In the case of a branch partition, the corresponding table (identified by
                <codeph>pg_partition_rule</codeph>) is an empty container table. In case of a leaf
              partition, the table contains the rows for that partition containment rule.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph id="hc179451">parchildrelid</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_class.oid</entry>
            <entry colname="col4">The table identifier of the partition (child table).</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parparentrule</codeph>
            </entry>
            <entry colname="col2">oid</entry>
            <entry colname="col3">pg_partition_rule.paroid</entry>
            <entry colname="col4">The row identifier of the rule associated with the parent table of
              this partition.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parname</codeph>
            </entry>
            <entry colname="col2">name</entry>
            <entry colname="col3"/>
            <entry colname="col4">The given name of this partition.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parisdefault</codeph>
            </entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">Whether or not this partition is a default partition.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parruleord</codeph>
            </entry>
            <entry colname="col2">smallint</entry>
            <entry colname="col3"/>
            <entry colname="col4">For range partitioned tables, the rank of this partition on this
              level of the partition hierarchy.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parrangestartincl</codeph>
            </entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">For range partitioned tables, whether or not the starting value is
              inclusive.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parrangeendincl</codeph>
            </entry>
            <entry colname="col2">boolean</entry>
            <entry colname="col3"/>
            <entry colname="col4">For range partitioned tables, whether or not the ending value is
              inclusive.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parrangestart</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">For range partitioned tables, the starting value of the
              range.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parrangeend</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">For range partitioned tables, the ending value of the
              range.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parrangeevery</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">For range partitioned tables, the interval value of the
                <codeph>EVERY</codeph> clause.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parlistvalues</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">For list partitioned tables, the list of values assigned to this
              partition.</entry>
          </row>
          <row>
            <entry colname="col1">
              <codeph>parreloptions</codeph>
            </entry>
            <entry colname="col2">text</entry>
            <entry colname="col3"/>
            <entry colname="col4">An array describing the storage characteristics of the particular
              partition.</entry>
          </row>
        </tbody>
      </tgroup>
    </table>
  </body>
</topic>
